<?php

/**
* @copyright   (C) 2010 iJoomla, Inc. - All rights reserved.
* @license  GNU General Public License, version 2 (http://www.gnu.org/licenses/gpl-2.0.html) 
* @author  iJoomla.com webmaster@ijoomla.com
* @url   http://www.ijoomla.com/licensing/
* the PHP code portions are distributed under the GPL license. If not otherwise stated, all images, manuals, cascading style sheets, and included JavaScript  
* are NOT GPL, and are released under the IJOOMLA Proprietary Use License v1.0 
* More info at http://www.ijoomla.com/licensing/
*/

	defined('_JEXEC') or die('Restricted access');	
?>

<table width="100%">
	<tr>
		<td align="right">
			<a target="_blank" href="http://www.ijoomla.com/redirect/survey/videos/email.htm" class="video">Video Tutorial <img src="components/com_surveys/images/icon_video.gif"></a>
		</td>
	</tr>	
</table>

<table width="100%" class="adminform">
	<th ><?php echo JText::_("COM_SURVEYS_EMAIL_SETTINGS"); ?> </th>		
	<tr>
		<td valign="top" width="100%">
			<table width="100%">
				<tr>
					<td colspan="2">
					<table style="margin-left:-10px;">
						<tr>
							<td>
								<?php echo JText::_("COM_SURVEYS_NOTITY_ME_BY_EMAIL"); ?>:
							</td>
							<td>
								<table>
									<tr>
										<td>
											<input type="radio" name="email_activ" value="1" <?php echo $this->email_settings["0"]["email_notification"] == '1' ? "checked" : "" ; ?>>
										</td>
										<td>	
											<?php echo JText::_("JYES"); ?>
										</td>
									</tr>
								</table>			
							</td>
							<td>
								<table>
									<tr>
										<td>
											<input type="radio" name="email_activ" value="0" <?php echo $this->email_settings["0"]["email_notification"] == '0' ? "checked" : "" ; ?>>
										</td>
										<td>											
											<?php echo JText::_("JNO"); ?>
										</td>
									</tr>
								</table>			
							</td>
						</tr>
					</table>					
					</td>
				</tr>
				
				<tr>
					<td nowrap width="10%">
						<?php echo JText::_("COM_SURVEYS_EMAIL_NOTIFICATION_TO"); ?>:
					</td>
					<td>
						<input class="text_area" type="text" name="email_to" value="<?php echo $this->email_settings["0"]["to"]; ?>" size="50" maxlength="50" title="" />&nbsp;&nbsp;&nbsp;<?php echo JText::_("COM_SURVEYS_ENTER_EMAIL_ADDRESS"); ?>
					</td>
				</tr>
				<tr>
					<td>
						<?php echo JText::_("COM_SURVEYS_FROM"); ?>:
					</td>
					
					<td>
					<input class="text_area" type="text" name="email_from" value="<?php echo $this->email_settings["0"]["from"]; ?>" size="50" maxlength="50" title="" />
					</td>
				</tr>
				<tr>
					<td>
						<?php echo JText::_("COM_SURVEYS_EMAIL_SUBJECT"); ?>:
					</td>
					
					<td>
						<input class="text_area" type="text" name="email_subject" value="<?php echo $this->email_settings["0"]["subject"]; ?>" size="50" maxlength="50" title="" />
					</td>
				</tr>
				<tr>
					<td valign="top">
						<?php echo JText::_("COM_SURVEYS_EMAIL_MESSAGE"); ?>:
					</td>					
					<td>
						<?php							
						$editor1  =& JFactory::getEditor();
						$this->email_settings["0"]["content"] = str_replace('\\&quot;', '', "<pre>".$this->email_settings["0"]["content"]."</pre>");
						echo $editor1->display( 'editor1',  ''.$this->email_settings["0"]["content"], '100%', '100%;', '200', '50', '10' ); ?>
					</td>
				</tr>
			</table>
		</td>
	</tr>
</table>